package com.tiancheng.trade.order.util;

import com.tiancheng.trade.order.bo.CreditOrderQueryDetailBo;

import java.util.Map;

/**
 * mock 信用服务消息回调
 */
public class MockCreditOrderRollbackData {
    public static CreditOrderQueryDetailBo detailQuery(Map<String, Object> param) {
        CreditOrderQueryDetailBo cd = new CreditOrderQueryDetailBo();
        cd.setAlipayAuthNo("A" + param.get("gwOrderId").toString());
        cd.setAmount(1L);
        cd.setTotalFreezeAmount(1L);
        cd.setTotalFreezeCreditAmount(1L);
        cd.setTotalPayAmount(0L);
        cd.setTotalPayFundAmount(1L);
        cd.setRestAmount(1L);
        cd.setAlipayOperationId("L"+param.get("gwOrderId").toString());
        cd.setPayerUserId("ghddfgdfgdfdfgdfdf123sddfg");
        cd.setStatus("FREEZE");
        cd.setGmtCreate("2024-09-18 10:10:10");
        cd.setPreAuthType("CREDIT_AUTH");
        cd.setTotalFreezeCreditAmount(0L);
        cd.setTotalFreezeFundAmount(0L);
        cd.setTotalPayCreditAmount(0L);
        cd.setTotalPayFundAmount(0L);
        cd.setRestCreditAmount(0L);
        cd.setRestFundAmount(0L);
        cd.setCreditAmount(0L);
        cd.setCreditAmount(0L);
        cd.setFundAmount(0L);
        cd.setGwOrderId(param.get("gwOrderId").toString());
        return cd;
    }

    public static CreditOrderQueryDetailBo cancelConfirm(Map<String, Object> param) {
        CreditOrderQueryDetailBo cd = new CreditOrderQueryDetailBo();
        cd.setAlipayAuthNo("A" + param.get("gwOrderId").toString());
        cd.setAmount(1L);
        cd.setTotalFreezeAmount(1L);
        cd.setTotalFreezeCreditAmount(1L);
        cd.setTotalPayAmount(0L);
        cd.setTotalPayFundAmount(1L);
        cd.setRestAmount(1L);
        cd.setAlipayOperationId("L"+param.get("gwOrderId").toString());
        cd.setPayerUserId("ghddfgdfgdfdfgdfdf123sddfg");
        cd.setStatus("FREEZE");
        cd.setGmtCreate("2024-09-18 10:10:10");
        cd.setPreAuthType("CREDIT_AUTH");
        cd.setTotalFreezeCreditAmount(0L);
        cd.setTotalFreezeFundAmount(0L);
        cd.setTotalPayCreditAmount(0L);
        cd.setTotalPayFundAmount(0L);
        cd.setRestCreditAmount(0L);
        cd.setRestFundAmount(0L);
        cd.setCreditAmount(0L);
        cd.setCreditAmount(0L);
        cd.setFundAmount(0L);
        cd.setGwOrderId(param.get("gwOrderId").toString());
        return cd;
    }
}
